From 609b94dd4fda0e0ff8e41f92699b53c6f97c7190 Mon Sep 17 00:00:00 2001 From: Finn Thain Date: Fri, 21 Dec 2018 17:21:43 +1100 Subject: [PATCH] Build with -ffreestanding on m68k to avoid risky optimizations involving libc Gbp-Pq: Topic bugfix/m68k Gbp-Pq: Name m68k-build-with-ffreestanding.patch --- arch/m68k/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index 997c9f20ea0..c318afd15e3 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile @@ -58,7 +58,7 @@ cpuflags-$(CONFIG_M5206e) := $(call cc-option,-mcpu=5206e,-m5200) cpuflags-$(CONFIG_M5206) := $(call cc-option,-mcpu=5206,-m5200) KBUILD_AFLAGS += $(cpuflags-y) -KBUILD_CFLAGS += $(cpuflags-y) -pipe +KBUILD_CFLAGS += $(cpuflags-y) ifdef CONFIG_MMU # without -fno-strength-reduce the 53c7xx.c driver fails ;-( KBUILD_CFLAGS += -fno-strength-reduce -ffixed-a2 @@ -69,6 +69,8 @@ KBUILD_CFLAGS += -D__uClinux__ KBUILD_AFLAGS += -D__uClinux__ endif +KBUILD_CFLAGS += -pipe -ffreestanding + KBUILD_LDFLAGS := -m m68kelf KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds -- 2.30.2